﻿package kizzo.geometry 
{
	import flash.geom.Point;
	import flash.geom.Matrix;

	public class PointOperations2D
	{
		
		public function PointOperations2D() 
		{
			
		}
		
		public static function rotate(pt:Point, angle:Number):Point
		{
			var tm:Matrix = new Matrix(Math.cos(angle), Math.sin(angle), -Math.sin(angle), Math.cos(angle));
			return tm.deltaTransformPoint(pt);
		}
		
		public static function scale(pt:Point, scale_vector:Point):Point
		{
			var tm:Matrix = new Matrix(scale_vector.x, 0, 0, scale_vector.y);
			return tm.deltaTransformPoint(pt);			
		}
	}
	
}